package com.xoa.controller.event;

import com.xoa.model.event.TimeLinePostUser;
import com.xoa.service.event.TimeLinePostUserService;
import com.xoa.util.ToJson;
import org.apache.poi.ss.formula.functions.T;
import org.apache.poi.xwpf.usermodel.TOC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by 张丽军 on 2017/9/1.
 */
@RestController
@RequestMapping("/timeLinePostUser")
public class TimeLinePostUserController {
    @Autowired
    TimeLinePostUserService timeLinePostUserService;

    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 下午14:01:25
     * 方法介绍:   修改大事记管理用户信息
     * @param request
     * @param timeLinePostUser
     * @return
     */
    @ResponseBody
    @RequestMapping("/updateTimeLinePostUser")
    public ToJson<TimeLinePostUser> updateTimeLinePostUser(HttpServletRequest request,TimeLinePostUser timeLinePostUser){
        return timeLinePostUserService.updateTimeLinePostUser(timeLinePostUser);
    }

    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 下午14:12:25
     * 方法介绍:   新建大事记管理用户信息
     * @param request
     * @param timeLinePostUser
     * @return
     */
    @ResponseBody
    @RequestMapping("/addTimeLinePostUser")
    public ToJson<TimeLinePostUser> addTimeLinePostUser(HttpServletRequest request,TimeLinePostUser timeLinePostUser){
        return timeLinePostUserService.addTimeLinePostUser(timeLinePostUser);
    }
}
